<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of datetime</title>
  <meta name="keywords" content="datetime">
  <meta name="description" content="Spits out the date and time in yymmdd_HHMM format">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html . -->
<h1>datetime
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Spits out the date and time in yymmdd_HHMM format</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [dt] = datetime(seconds) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Spits out the date and time in yymmdd_HHMM format

 [dt] = datetime([seconds])

 The advantage of this is that alphabetic order is also
 chronological).

 If SECONDS = true, adds _SS at the end (defaults to false).</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="add_history.html" class="code" title="function [subj] = add_history(subj,objtype,objname,hist_str,displayme)">add_history</a>	Adds HIST_STR to OBJNAME's history field.</li><li><a href="add_results_history.html" class="code" title="function [results] = add_results_history(results,hist_str,displayme)">add_results_history</a>	Adds a line to the results.header.history field</li><li><a href="cross_validation.html" class="code" title="function [subj results] = cross_validation(subj,patname,regsname,selgroup,maskgroup,class_args,varargin)">cross_validation</a>	Cross-validation classification</li><li><a href="init_object.html" class="code" title="function [subj] = init_object(subj,objtype,new_objname)">init_object</a>	Add a new empty object</li><li><a href="init_subj.html" class="code" title="function [subj] = init_subj(exp_name,id,varargin)">init_subj</a>	Returns an empty initialized SUBJ structure</li><li><a href="move_pattern_to_hd.html" class="code" title="function [subj pathfilename] = move_pattern_to_hd(subj,patname,varargin)">move_pattern_to_hd</a>	Moves the pattern MAT to the hard disk</li><li><a href="save_subj.html" class="code" title="function [subj fn] = save_subj(subj,varargin)">save_subj</a>	This just saves the subj structure to a file.</li><li><a href="set_mat.html" class="code" title="function [subj] = set_mat(subj,objtype,objname,newmat,varargin)">set_mat</a>	Updates the MAT contents of an object</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [dt] = datetime(seconds)</a>
0002 
0003 <span class="comment">% Spits out the date and time in yymmdd_HHMM format</span>
0004 <span class="comment">%</span>
0005 <span class="comment">% [dt] = datetime([seconds])</span>
0006 <span class="comment">%</span>
0007 <span class="comment">% The advantage of this is that alphabetic order is also</span>
0008 <span class="comment">% chronological).</span>
0009 <span class="comment">%</span>
0010 <span class="comment">% If SECONDS = true, adds _SS at the end (defaults to false).</span>
0011 
0012 <span class="comment">% This is part of the Princeton MVPA toolbox, released under the</span>
0013 <span class="comment">% GPL. See http://www.csbmb.princeton.edu/mvpa for more</span>
0014 <span class="comment">% information.</span>
0015 
0016 
0017 <span class="keyword">if</span> ~exist(<span class="string">'seconds'</span>,<span class="string">'var'</span>)
0018   seconds = false;
0019 <span class="keyword">end</span>
0020 
0021 <span class="keyword">if</span> seconds
0022   dt = datestr(now,<span class="string">'yymmdd_HHMM_SS'</span>);
0023 <span class="keyword">else</span>
0024   dt = datestr(now,<span class="string">'yymmdd_HHMM'</span>);
0025 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Thu 08-Sep-2005 12:05:17 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>